using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CheckoutCodeKata
{
    public class Cassa
    {
        private readonly PriceList _priceList;
        private Display _display;

        public Cassa(PriceList priceList, Display display)
        {
            _priceList = priceList;
            _display = display;
        }

        public void Scan(string itemCode)
        {
            int price = _priceList.GetPrice(itemCode);
            _display.Show(price);
        }
    }
}
